import { createRouter, createWebHistory } from "vue-router";
import Index from "@/views/Index.vue";
import DataBase from "@/views/DataBase.vue";
import Report01 from "@/views/report/Report01.vue";

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            name: "index",
            component: Index,
        },

        {
            path: "/report01",
            name: "report01",
            component: Report01,
        },
        {
            path: "/config",
            name: "config",
            component: Index,
            children: [
                {
                    path: "database",
                    name: "database",
                    component: DataBase,
                },
                {
                    path: "1",
                    name: "config1",
                    component: () => import("@/views/config/Config01.vue"),
                },
                {
                    path: "r1",
                    name: "report1",
                    component: Report01,
                },
            ],
        },
    ],
});

export default router;
